package jj.fly.activiti.leavebill.service;

import jj.fly.activiti.leavebill.vo.SubmitTaskVo;
import jj.fly.activiti.leavebill.domain.LeaveBill;
import org.activiti.engine.repository.Deployment;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.task.Comment;
import org.activiti.engine.task.Task;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

/**
 * Author: jiangjun
 * Date: 2018/5/9
 * Time: 上午9:48
 * Description: 工作流相关服务
 */
public interface IWorkflowService {

    /**
     * 工作流发布
     * @param name
     * @param file
     * @throws Exception
     */
    void deploy(String name, byte[] file) throws Exception;

    List<Deployment> getDeploymentList();

    List<ProcessDefinition> getProcessDefinitionList();

    InputStream getImageInputStream(String deployId, String imageName);

    void deleteProcessDefinitionByDeployId(String deployId);

    void startProcess(Integer leaveBillId);

    List<Task> getTaskListByEmployeeName(String name);

    String getTaskFormKeyByTaskId(String taskId);

    LeaveBill getLeaveBillByTaskId(String taskId);

    List<String> getOutcomeListByTaskId(String taskId);

    void submitTask(SubmitTaskVo vo);

    List<Comment> getCommentByTaskId(String taskId);

    List<Comment> getCommentByLeaveBillId(Integer id);

    ProcessDefinition getProcessDefinitionByTaskId(String taskId);

    Map<String,Object> getCoordingByTaskId(String taskId);
}
